package cn.topevery.garden.dal.dao;

import cn.topevery.garden.entity.po.GreLand;
import cn.topevery.garden.entity.query.GreLandQuery;
import cn.topevery.garden.entity.vo.*;
import cn.topevery.garden.framework.base.BaseDao;
import hw.topevery.framework.db.entity.DataPager;
import org.locationtech.jts.geom.Geometry;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * @author code-generate
 * @date 2022-01-05
 */
public interface GreLandDao extends BaseDao<GreLand> {


    /**
     * 获取列表
     *
     * @param query
     */
    DataPager<GreLandVO> listPage(GreLandQuery query);

    DataPager<GreLandRecordVO> getRecordList(GreLandQuery query);

    GreLand getEntityByColumn(String key, String value);

    GreLandVO getGreLandById(Integer id);

    List<Map<String, Object>> getShortList(String deptId);

    void commit(GreLandVO vo, Integer userId);

    boolean isExist(String code);

    List<Map<String, Object>> getCityAreaCoveragePercent(LocalDate beginDate, LocalDate endDate, String mapId);

    List<CoveragePercentVO> getCoveragePercent();

    Map<String, Object> getCitySumAreaCompareInfoByDate(String date);

    Map<String, Object> getSituation();

    Map<String, Object> getSituationShow();

    Map<String, Object> getParkSituation();

    Map<String, Object> getParkSituationShow();

    List<Map<String, Object>> getAreaStat();
    Map<String, Object> getDataByBoundResource(GreLandQuery query);

    DataPager<GreLandInDeptVO> getGreLandInDept(GreLandQuery query);

    List<CoveragePercentVO> getCoveragePercentByDate(LocalDate beginDate, LocalDate endDate);

    List<GreLand> getServiceAreaGreLandList();

    DataPager<Map<String, Object>> getList(GreLandQuery query);

    void deleteByIds(List<String> ids, Integer userId);

    void updateBySql(GreLand greLand);

    void dataPublics(List<Integer> ids, Integer userId);

    List<Map<String, Object>> getSurvey();

    void uptSurvery(String id, String geom_text);

    void updateLand(String id, String geom_text);

    List<GreLand> getNewUpdateGre(Map<String, String> map);

    void updateGreServiceArea(GreLand greLand);

    void insertSql(GreLandVO greLand);

    String getCode(String mapId, String classId);

    String getNewcode(String mapId, String classId);

    List<GardenServiceRadiusVO> getGardenServiceRadius();

    List<Map<String, Object>> getLandAndParkCount();

    Geometry getGeoBuffer(String geomWellKnownText, double distance);

    List<Geometry> getAllGeoRadius();
}
